#include <iostream>
using namespace std;

void inverseString(char* str)
{
    if (str == NULL) return;
    int length = strlen(str);
    char* end = str + (length-1);
    while (str < end) {
        char tmp = *end;
        *end = *str;
        *str = tmp;
        ++str;
        --end;
    }
    return ;
}

int main()
{
    char testStr[] = "oh my god!";
    inverseString(testStr);
    cout << testStr << endl;
}
